//
//  LZLHomePageViewController.swift
//  swiftDemo
//
//  Created by luozhilin on 2018/9/13.
//  Copyright © 2018年 luozhilin. All rights reserved.
//

import UIKit
import DNSPageView

class LZLHomePageViewController: LZLBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let style = DNSPageStyle()
        style.isTitleScrollEnable = false
        style.isScaleEnable = true
        style.isShowBottomLine = true
        style.titleSelectedColor = UIColor.black
        style.titleColor = UIColor.gray
        style.bottomLineColor = DominantColor
        style.bottomLineHeight = 1.5
    
        
        
        let titles = ["推荐","分类","VIP","直播","广播"]
        
        let viewControllers:[UIViewController] = [LZLRecommondViewController(),LZLCategoryViewController(),LZLVIPViewController(),LZLLiveViewController(),LZLBroadcastViewController()]
        for vc in viewControllers {
            self.addChildViewController(vc)
        }
        
        let pageView = DNSPageView(frame: CGRect(x: 0, y: navigationBarHeight, width: YYScreenWidth, height: YYScreenHeigth-navigationBarHeight-44), style: style, titles: titles, childViewControllers: viewControllers)
        view.addSubview(pageView)
    }

    

}
